package com.example.timeemail.my;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import com.example.timeemail.R;

public class OpinionActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_opinion);
    }

    public void oppinion_sub(View view){
        Button btn_oppinion_sub = (Button)findViewById(R.id.btn_oppinion_sub);
        ToastShow("提交成功");
    }


    void ToastShow(String context){
        Toast toast = Toast.makeText(this, context, Toast.LENGTH_LONG);
        View view = LayoutInflater.from(this).inflate(R.layout.toast_template,null);
        TextView TxtTaostContext = (TextView)view.findViewById(R.id.TxtTaostContext);
        TxtTaostContext.setText(context);
        toast.setView(view);
        toast.setGravity(Gravity.CENTER,0,0);
        toast.show();
    }
}